﻿var getWorkoutById = function getWorkoutById_(id, callback) {
    var url = "/api/workout?id=".concat(id);
    $.getJSON(url, function (data) {
        callback(data);
    });
};
var getWorkouts = function getWorkouts_(callback) {
    var url = "/api/workout";
    $.getJSON(url, function (data) {
        callback(data);
    });
};
var postWorkout = function postWorkout_(workoutData, callback) {
    $.ajax({
        url: "/api/workout",
        type: 'POST',
        contentType: 'application/json; charset=utf-8',
        data: workoutData,
        success: function (result) {
            callback(result);
        }
    });
};
var deleteWorkout = function deletetWorkout_(id, callback) {
    $.ajax({
        url: "/api/workout?id=" + id,
        type: 'DELETE',
        contentType: 'application/json; charset=utf-8',
        success: function (result) {
            callback(result);
        }
    });
};